Make F2 work for renaming bookmarks. (#320822, Jaap A. Haitsma, patch by
authorMatthias Clasen <mclasen@redhat.com>
Mon, 28 Nov 2005 14:03:20 +0000 (14:03 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 28 Nov 2005 14:03:20 +0000 (14:03 +0000)
2005-11-28  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkfilechooserdefault.c (shortcuts_key_press_event_cb): Make
F2 work for renaming bookmarks.  (#320822, Jaap A. Haitsma, patch
by Paolo Borelli)

ChangeLog
ChangeLog.pre-2-10
gtk/gtkfilechooserdefault.c

index 7106a9fecf176ab45ecb64a45ca7268c3297b370..2d5b496cb74377082876614a40981c2cc4387041 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-11-28  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkfilechooserdefault.c (shortcuts_key_press_event_cb): Make
+       F2 work for renaming bookmarks.  (#320822, Jaap A. Haitsma, patch
+       by Paolo Borelli)
+
 2005-11-28  Tor Lillqvist  <tml@novell.com>
 
        * gdk/win32/gdkwindow-win32.c (gdk_window_set_urgency_hint):
index 7106a9fecf176ab45ecb64a45ca7268c3297b370..2d5b496cb74377082876614a40981c2cc4387041 100644 (file)
@@ -1,3 +1,9 @@
+2005-11-28  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkfilechooserdefault.c (shortcuts_key_press_event_cb): Make
+       F2 work for renaming bookmarks.  (#320822, Jaap A. Haitsma, patch
+       by Paolo Borelli)
+
 2005-11-28  Tor Lillqvist  <tml@novell.com>
 
        * gdk/win32/gdkwindow-win32.c (gdk_window_set_urgency_hint):
index 2fd00ac8942050aab173c363fa873c6b1f6ca991..d25d45897790bf4dcd5ae85c2791f5f7384af7ad 100644 (file)
@@ -2962,9 +2962,9 @@ remove_shortcut_cb (GtkMenuItem           *item,
   remove_selected_bookmarks (impl);
 }
 
+/* Rename the selected bookmark */
 static void
-rename_shortcut_cb (GtkMenuItem           *item,
-                   GtkFileChooserDefault *impl)
+rename_selected_bookmark (GtkFileChooserDefault *impl)
 {
   GtkTreeIter iter;
   GtkTreePath *path;
@@ -2986,6 +2986,13 @@ rename_shortcut_cb (GtkMenuItem           *item,
     }
 }
 
+static void
+rename_shortcut_cb (GtkMenuItem           *item,
+                   GtkFileChooserDefault *impl)
+{
+  rename_selected_bookmark (impl);
+}
+
 /* Constructs the popup menu for the file list if needed */
 static void
 shortcuts_build_popup_menu (GtkFileChooserDefault *impl)
@@ -6789,6 +6796,13 @@ shortcuts_key_press_event_cb (GtkWidget             *widget,
       return TRUE;
     }
 
+  if ((event->keyval == GDK_F2)
+      && (event->state & modifiers) == 0)
+    {
+      rename_selected_bookmark (impl);
+      return TRUE;
+    }
+
   return FALSE;
 }